package com.controller;

import javax.xml.ws.RequestWrapper;
import java.util.List;

@Controller
public class OrderController {
   @RequestMapping("shoeOrder")
   public void f(User user) {
       List<Order> orders = user.getAddress();
       System.out.println("订单：");
       for (int i = 0; i <orders.size(); i++) {
           Order order = orders.get(i);
           System.out.println("订单号:"+order.getOrderId());
           System.out.println("订单地址："+addressList.get(i));
       }
       return ;
   }
    @RequestMapping("/orderInfo")
    public void getOrderInfo(Order order) {
        String orderId = order.getOrderId();
        HashMap<String, Product> orderInfo = order.getProductInfo();
        Set<String> keys = orderInfo.keySet();
        System.out.println("订单id: " + orderId);
        System.out.println("订单商品信息: ");
        for (String key : keys) {
            Product product = orderInfo.get(key);
            String proId = product.getProId();
            String proName = product.getProName();
            System.out.println(key + "类~"+"商品id: "+proId+" 商品名称: "+proName);
        }
    }
}
}
